package com.ljx.funchat.user.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

@AllArgsConstructor
@Getter
public enum UserApplyTypeEnum {

    FRIEND(1, "添加好友"),
    GROUP(2, "添加群聊");

    private Integer status;
    private String desc;

    private static Map<Integer, UserApplyTypeEnum> cache;

    static {
        cache = Arrays.stream(UserApplyTypeEnum.values()).collect(Collectors.toMap(UserApplyTypeEnum::getStatus, Function.identity()));
    }


}
